Unit BDojoxContentPaneUnit;

{$mode objfpc}{$H+}

Interface

Uses
  Classes, SysUtils, BDojoSessionUnit, BDijitContentPaneUnit;

Type

{ BDojoxContentPaneClass }

 BDojoxContentPaneClass = Class(BDijitContentPaneClass)
  Private
    bExecuteScripts: Boolean;
    bIOMethod: String;
    bRenderStyles: Boolean;
    Procedure SetExecuteScripts(aValue: Boolean);
    Procedure SetIOMethod(aValue: String);
    Procedure SetRenderStyles(aValue: Boolean);
  Public
    //** Execute (eval) scripts that is found in the content
    Property ExecuteScripts: Boolean Read bExecuteScripts
      Write SetExecuteScripts;
    //** JSObject. Reference to the method that should grab the content
    Property IOMethod: String Read bIOMethod Write SetIOMethod;
    //** Trigger/load styles in the content
    Property RenderStyles: Boolean Read bRenderStyles Write SetRenderStyles;
    Constructor Build(Const aSession: BDojoSessionClass;
      Const aJSType: String = ''); Override;
    Destructor Burn; Override;
End;

Implementation

{ BDojoxContentPaneClass }

Procedure BDojoxContentPaneClass.SetExecuteScripts(aValue: Boolean);
Begin
  bExecuteScripts := aValue;
  SetConfig('', aValue);
End;

Procedure BDojoxContentPaneClass.SetIOMethod(aValue: String);
Begin
  bIOMethod := aValue;
  SetConfig('', aValue);
End;

Procedure BDojoxContentPaneClass.SetRenderStyles(aValue: Boolean);
Begin
  bRenderStyles := aValue;
  SetConfig('', aValue);
End;

Constructor BDojoxContentPaneClass.Build(Const aSession: BDojoSessionClass;
  Const aJSType: String);
Begin
  If aJSType = '' Then Inherited Build(aSession, 'dojox.layout.ContentPane')
  Else Inherited Build(aSession, aJSType);
End;

Destructor BDojoxContentPaneClass.Burn;
Begin
  Inherited Burn;
End;

End.

